﻿using System;
using System.Windows.Input;
using Oxage.Printing.Models;

namespace Oxage.Printing
{
	public class RefreshCommand : ICommand
	{
		#region Private members
		private PrintViewModel parent;
		#endregion

		#region Constructor
		public RefreshCommand(PrintViewModel parent)
		{
			this.parent = parent;
		}
		#endregion

		#region ICommand Members
		public bool CanExecute(object parameter)
		{
			return true;
		}

		public event EventHandler CanExecuteChanged;

		public void Execute(object parameter)
		{
			this.parent.RefreshPreview();
		}
		#endregion
	}
}
